package book;

import java.util.Arrays;

public class BookList {
    public Book[] books = new Book[10];
    int usedSize;
    public BookList() {
        this.books[0] = new Book("三国演义", "罗贯中", 19, "小说");
        this.books[1] = new Book("红楼梦", "曹雪芹", 27, "小说");
        this.books[2] = new Book("西游记", "吴承恩", 15, "小说");

        usedSize = 3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    @Override
    public String toString() {
        return "BookList{" +
                "books=" + Arrays.toString(books) +
                '}';
    }
}
